import json

class ReqLog:
    def __init__(self, type,req, resp,time):
        self.type = type
        self.req = req
        self.resp = resp
        self.time = time

    def to_json(self):
        return json.dumps(self.__dict__)